
local key = "moment:my_moment:" .. ARGV[1]
local key2 = "moment:public_moment:" .. ARGV[1]
local timestamp = tonumber(ARGV[3])
redis.call('ZADD',key,timestamp,ARGV[2])
redis.call('ZADD',key2,timestamp,ARGV[2])

for i = 1, #KEYS do
    local newKey1 = "moment:public_moment:" .. KEYS[i]
    redis.call('ZADD', newKey1, timestamp, ARGV[2])
end
